<template>
<div>
  <h1>这是父级</h1>
  <button @click="zi">获取子对象</button>
  <Zi ref="Fuzi"></Zi>
</div>
</template>

<script>
import Zi from "@/views/Zi";
export default {
  name: "Fu",
  components: {Zi},
  methods:{
    zi(){
     const zi=this.$refs.Fuzi;
      zi.one();
      zi.$data.name='变了啊啊'
      // this.$refs.Fuzi
    }
  }
}
</script>

<style scoped>

</style>